/*
 *      Author:	Wolter Hellmund
 *      Email:	wolterh6@gmail.com
 *      --------------------------------------
 *      Interface header
 *      --------------------------------------
 *      Copyright 2009. All Rights Reserved.
 */

#ifndef BAMBOX_INTERFACE
#define BAMBOX_INTERFACE

#include "global.hpp"
#include <gtkmm.h>
#include <libglademm.h>
#include "handy.hpp"
#include "record.hpp"

class MainWindow
{
	// Constructor and destructor
	public:
		MainWindow(Record);		// Specify need of a Record type argument
		virtual ~MainWindow();
	
	// GUI stuff
	protected:
		// Actions
		virtual void axn_ply();
		virtual void axn_stp();
		virtual void axn_add();
		virtual void axn_del();
		virtual void axn_abt();
		
		virtual void combo_add(string);
		virtual void combo_loadFromRecord(Record);
		
		// Widgets
		Glib::RefPtr<Gnome::Glade::Xml> glade;
		Gtk::Window*	window;
		Gtk::Toolbar*	toolbar;
			Gtk::ToolButton*	btn_ply;
			Gtk::ToolButton*	btn_stp;
			Gtk::ToolButton*	btn_add;
			Gtk::ToolButton*	btn_del;
			Gtk::ToolButton*	btn_abt;
		Gtk::ComboBox*	combo;
			Glib::RefPtr<Gtk::ListStore> combo_tree;
		Gtk::ProgressBar* pbar;
		
		class ModelColumn : public Gtk::TreeModel::ColumnRecord
		{
		public:
			// Add the combobox item automatically
			ModelColumn() { add(combo_item); }
			// The strings going to be displayed in the combobox
			Gtk::TreeModelColumn<Glib::ustring> combo_item;
		} combo_column;	// Because we only need one column, lets create it at once
};

void ui_init(int,char**);	

#endif
